<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>不存在变量提升</title>
	<script>
		///////////////////////////////////
		
		// console.log(foo); //undefined
		// var foo = 2;

		// console.log(bar); //ReferenceError
		// let bar = 2;

		///////////////////////////////////


		var tmp = 123;
		if(true){
			let = tmp;
			console.log(tmp);   //123
			
			tmp = 'abc';
		}
		
	</script>
</head>
<body>
	
</body>
</html>